<div class="GoodsInfoWrap">


  <table width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="1"><div class="goodspic"><a href="#" target="_blank"><img src="<{$goods.small_pic|storager}>" alt="<{$product.name}>"/></a></div></td>
    <td valign="top"><h1 class="goodsname"><a class="lnk"  href="<{link ctl=product act=index arg0=$goods.goods_id }>"><{$goods.name}></a></h1>
    <ul class="goodsprops clearfix">
    <{if $goods.bn}>
    <li><span><{t}>货号：<{/t}></span><{$goods.bn}></li>
    <{/if}>
    <{if $goods.brand_name}>
    <li><span><{t}>商品品牌：<{/t}></span><{$goods.brand_name}></li>
    <{/if}>
    <{if $goods.weight}>
    <li><span><{t}>商品重量：<{/t}></span><{$goods.weight}><{t}> 克(g)<{/t}></li>
    <{/if}>
    <{if $goods.score}>
    <li><span><{t}>所得积分：<{/t}></span><{$goods.score}></li>
    <{/if}>
    <{if $trading.score && $trading.score <> $goods.score}>
    <li><span><{t}>特价积分：<{/t}></span><{$trading.score}></li>
    <{/if}>
    <{if $goods.mktprice && $goods.setting.mktprice}>
    <li><span><{t}>市场价：<{/t}></span><{$goods.mktprice|cur}></li>
    <{/if}>
    <{if count($goods.products)<2}>
    <li><span><{t}>销售价：<{/t}></span><{$goods.price|cur}></li>
    <{if $goods.mktprice > $goods.price && $goods.setting.mktprice && $goods.setting.saveprice > 0}>
    <li><span></span><{if $goods.setting.saveprice == 1}>节省：<{$goods.mktprice-$goods.price|cur}>
          <{elseif $goods.setting.saveprice == 2}><{t}>优惠：<{/t}><{$goods.price/$goods.mktprice*100|number:'2'}>%
          <{elseif $goods.setting.saveprice == 3}><{$goods.price/$goods.mktprice*10|number:'1'}>折<{/if}>
    </li>
         <{/if}>
    <{/if}>
    </ul>
    <a class="lnk"  href="<{link ctl=product act=index arg0=$goods.goods_id }>"><{t}>查看详细<{/t}></a>

  </td>
  </tr>
</table>


 <h3 class="goodsname " style="margin-top:10px;"><span><a class="lnk" href="<{link ctl=product act=index arg0=$goods.goods_id }>"><{$goods.name}></a><{t}>的<{/t}><{$comment.pagetitle}></span></h3>






<div class="body Comments section FormWrap pdtdetail" style="border:none" id="goods-comment">

<{foreach from=$commentData item=comlist name=comments}>

  <div class="division boxBrown clearfix" >
    <div class=" floatLeft commentMain">
    <span class="author fontcolorOrange"><{$comlist.author}><!--<{if $comlist.levelname!=""}> [<{$comlist.levelname}>]<{/if}> --></span> <{t}>说：<{/t}>
    <span class="timpstamp font10px fontcolorGray"><{$comlist.time|cdate:'SDATE_STIME'}></span>
    <div><{$comlist.comment|escape:'html'}></div>
    </div><{if $ask.member_lv =='' && $comment_all != 'null'}>&nbsp;<{else}><a class="floatRight lnk " href='<{link ctl="comment" act="reply" arg0=$comlist.comment_id arg1=$comment.item}>'><{t}>回复此评论<{/t}></a><{/if}>
    </div>
    <div class="commentReply prepend-1">
    <{foreach from=$comlist.items item=items}>
    <div class="division  item " style=" margin-top:0;" >
    <span class="author fontcolorOrange"><{$items.author}><!--<{if $items.levelname!=""}> [<{$items.levelname}>]<{/if}> --><{t}>回复：<{/t}></span>
    <span class="timpstamp font10px fontcolorGray"><{$items.time|cdate:'SDATE_STIME'}></span>
    <div><{$items.comment}></div>
    </div>

 <{/foreach}>
 </div>




<{/foreach}>

<{pager data=$pager}>
<script>
/*验证码刷新*/
function changeimg(id,type){
    $(id).set('src','<{link ctl="passport" act="verifyCode" arg0="'+type+'"}>#'+$time());
}

    var checkFormReqs =function(e){
           e    = new Event(e);
       var form= $(e.target);

       var reqs = $$(form.getElements('input[type=text]'),form.getElements('textarea'));

       if(reqs.some(function(req){

            if(req.getValue().trim()==''){
                       req.focus();
                       MessageBox.error('请完善表单必填项.');
                       return true;
            }

              return false;


       })){

           e.stop();

       }

    };
 </script>
<form  method="post" action='<{link ctl="comment" act="toComment" arg0=$goods.goods_id arg1=$comment.item}>' onsubmit='checkFormReqs(event);'>
<h4><{t}>发表<{/t}><{$comment.pagetitle}><span><{t}>（已有<{/t}><em><{$comment.total|default:'0'}></em><{t}>条）<{/t}></span></h4>
<div class="division">
<{if $ask.member_lv =='' && $comment_all != 'null'}>
      <{if $comment.pagetitle eq '商品评论'}>
  <a href="<{link ctl=passport act=login}>"><{t}><image src="statics/btn-discuss.gif" /><{/t}></a>
   <{else}>
   <a href="<{link ctl=passport act=login}>"><{t}><image src="statics/btn-ask.gif" /><{/t}></a>
           <{/if}>
<{else}>
      <table border="0" width="100%" cellpadding="0" cellspacing="0" class="forform">
          <tr>
            <th><{t}>标题：<{/t}></th>
                <td><{input type="text" class="inputstyle blur"  required="true" size=50 name="title" value="[咨询]".$goods.name }></td>
            </tr>
           <tr>
           <th><{t}>联系方式：<{/t}></th>
                <td><{input type="text" class="inputstyle"   size=20 name="contact"}><span class="infotips"><{t}>(可以是电话、email、qq等)<{/t}></span></td>
            </tr>
            <tr>
            <th><em>*</em><{t}><{$comment.pagetitle}>内容：<{/t}></th>
              <td><{input type="textarea" class="inputstyle" required="true" rows="5" name="comment" style="width:70%;"}></td>
            </tr>
            <tr>
            <tr>
            <{if $askshow == "on"}>
            <th><em>*</em><{t}>验证码：<{/t}></th>
              <td><{input type="text" required="true" size="4" maxlength="4" name="askverifyCode"}>&nbsp;<img src="<{link ctl="passport" act="verifyCode" arg0="ask"}>" border="1" id="askimgVerifyCode"/><a href="javascript:changeimg('askimgVerifyCode','ask')"><{t}>&nbsp;看不清楚?换个图片<{/t}></a></td>
            <{/if}>
            <{if $discussshow == "on"}>
             <tr>
            <th><em>*</em><{t}>验证码：<{/t}></th>
                <td><{input type="text" required="true" size="4" maxlength="4" name="discussverifyCode"}>&nbsp;<img src="<{link ctl="passport" act="verifyCode" arg0="discuss"}>" border="1" id="discussimgVerifyCode"/><a href="javascript:changeimg('discussimgVerifyCode','discuss')"><{t}>&nbsp;看不清楚?换个图片<{/t}></a>
                </td>
            </tr>
            <{/if}>
            <td></td>
              <td><input class="buttonstyle" type="submit" value="提交<{$comment.pagetitle}>"></td>
            </tr>
        </table>  
<{/if}>
  </div>




</form>
</div>
</div>